home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr44 / newmat08.zip / INCLUDE.H < prev    next >
C/C++ Source or Header  |  1995-01-19  |  5KB  |  183 lines

  1. //$$ include.h           include files required by various versions of C++
  2.  
  3. #ifndef INCLUDE_LIB
  4. #define INCLUDE_LIB
  5.  
  6.  
  7. //#define Glock                         // for Glockenspiel on the PC
  8.  
  9. //#define SETUP_C_SUBSCRIPTS              // allow element access via A[i][j]
  10.  
  11. // Activate just one of the following 3 statements
  12.  
  13. //#define SimulateExceptions              // use simulated exceptions
  14. #define UseExceptions                   // use C++ exceptions
  15. //#define DisableExceptions               // don't use exceptions
  16.  
  17.  
  18. #define TEMPS_DESTROYED_QUICKLY         // for compilers that delete
  19.                     // temporaries too quickly
  20.  
  21. #define TEMPS_DESTROYED_QUICKLY_R       // the same thing but applied
  22.                     // to return from functions only
  23.  
  24. //#define DO_FREE_CHECK                   // check news and deletes balance
  25.  
  26. #define USING_DOUBLE                    // elements of type double
  27. //#define USING_FLOAT                   // elements of type float
  28.  
  29. #define Version21                       // version 2.1 or later
  30.  
  31.  
  32. //*********************** end of options set by user ********************
  33.  
  34.  
  35. #define DEFAULT_HEADER                  // use AT&T style header
  36.                                         // if no other compiler is recognised
  37.  
  38. #ifdef _MSC_VER                         // Microsoft
  39.    #include <stdlib.h>
  40.  
  41. //   reactivate these statements to run under MSC version 7.0
  42. //   typedef int jmp_buf[9];
  43. //   extern "C"
  44. //   {
  45. //      int __cdecl setjmp(jmp_buf);
  46. //      void __cdecl longjmp(jmp_buf, int);
  47. //   }
  48.  
  49.    #ifdef WANT_STREAM
  50.       #include <iostream.h>
  51.       #include <iomanip.h>
  52.    #endif
  53.    #ifdef WANT_MATH
  54.       #include <math.h>
  55.       #include <float.h>
  56.    #endif
  57.    #undef DEFAULT_HEADER
  58. #endif
  59.  
  60. #ifdef __ZTC__                          // Zortech
  61.    #include <stdlib.h>
  62.    #ifdef WANT_STREAM
  63.       #include <iostream.hpp> 
  64.       #include <iomanip.hpp>
  65.       #define flush ""                  // not defined in iomanip?
  66.    #endif
  67.    #ifdef WANT_MATH
  68.       #include <math.h>
  69.       #include <float.h>
  70.    #endif
  71.    #undef DEFAULT_HEADER
  72. #endif
  73.  
  74. #ifdef __BCPLUSPLUS__                   // Borland
  75.    #include <stdlib.h>
  76.    #ifdef WANT_STREAM
  77.       #include <iostream.h>
  78.       #include <iomanip.h>
  79.    #endif
  80.    #ifdef WANT_MATH
  81.       #include <math.h>
  82.       #define SystemV                   // optional in Borland
  83.       #include <values.h>               // Borland has both float and values
  84.    #endif
  85.    #undef __TURBOC__                    // also defined in Borland
  86.    #undef DEFAULT_HEADER
  87. #endif
  88.  
  89. #ifdef __TURBOC__                       // Turbo
  90.    #include <stdlib.h>
  91.    #ifdef WANT_STREAM
  92.       #include <iostream.h>
  93.       #include <iomanip.h>
  94.    #endif
  95.    #ifdef WANT_MATH
  96.       #include <math.h>
  97.       #define SystemV                   // optional in Turbo
  98.       #include <values.h>
  99.    #endif
  100.    #undef DEFAULT_HEADER
  101. #endif
  102.  
  103. #ifdef __GNUG__                         // Gnu C++
  104.    #include <stdlib.h>
  105.    #ifdef WANT_STREAM
  106.       #include <iostream.h>
  107.       #include <iomanip.h>
  108.    #endif
  109.    #ifdef WANT_MATH
  110.       #include <math.h>
  111.       #include <float.h>
  112.    #endif
  113.    #undef DEFAULT_HEADER
  114. #endif
  115.  
  116. #ifdef Glock                            // Glockenspiel
  117.    extern "C" { #include <stdlib.h> }
  118.    #ifdef WANT_STREAM
  119.       #include <stream.hxx>
  120.       #include <iomanip.hxx>
  121.    #endif
  122.    #ifdef WANT_MATH
  123.       extern "C" { #include <math.h> }
  124.       extern "C" { #include <float.h> }
  125.    #endif
  126.    #define NO_LONG_NAMES                // very long names don't work
  127.    #undef DEFAULT_HEADER
  128. #endif
  129.  
  130. #ifdef __WATCOMC__                      // Watcom C/C++
  131.    #include <stdlib.h>
  132.    #ifdef WANT_STREAM
  133.       #include <iostream.h>
  134.       #include <iomanip.h>
  135.    #endif
  136.    #ifdef WANT_MATH
  137.       #include <math.h>
  138.       #include <float.h>
  139.    #endif
  140.    #undef DEFAULT_HEADER
  141. #endif
  142.  
  143.  
  144. #ifdef macintosh                        // MPW C++ on the Mac
  145. #include <stdlib.h>
  146. #ifdef WANT_STREAM
  147. #include <iostream.h>
  148. #include <iomanip.h>
  149. #endif
  150. #ifdef WANT_MATH
  151. #include <float.h>
  152. #include <math.h>
  153. #endif
  154. #undef DEFAULT_HEADER
  155. #endif
  156.  
  157. #ifdef DEFAULT_HEADER                   // for example AT&T
  158. #define ATandT
  159. #include <stdlib.h>
  160. #ifdef WANT_STREAM
  161. #include <iostream.h>
  162. #include <iomanip.h>
  163. #endif
  164. #ifdef WANT_MATH
  165. #include <math.h>
  166. #define SystemV                         // use System V
  167. #include <values.h>
  168. #endif
  169. #endif
  170.  
  171. #ifdef USING_FLOAT                      // set precision type to float
  172. typedef float Real;
  173. typedef double long_Real;
  174. #endif
  175.  
  176. #ifdef USING_DOUBLE                     // set precision type to double
  177. typedef double Real;
  178. typedef long double long_Real;
  179. #endif
  180.  
  181.  
  182. #endif
  183.